<!DOCTYPE html>
<html>
<head>
	<title>fillText</title>
	<style type="text/css">
		*{
			padding: 0;
			margin: 0;
		}
	</style>
</head>
<body>

	<canvas id="canvas" width="500" height="300" style="border: 1px solid #ccc;"></canvas>

	<script type="text/javascript">
		
		var canvas = document.getElementById("canvas");
		var ctx = canvas.getContext("2d");

		ctx.font = "48px serif";
		ctx.fillText("Hello world", 50, 150);

	</script>
</body>
</html>